package com.aaa.base.mapper;

import com.aaa.entity.base.Locator;
import com.aaa.entity.stock.Stock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author aaa
 * @since 2020-11-23
 */
@Component
public interface LocatorMapper extends BaseMapper<Locator> {

    @Select("SELECT code,name FROM sys_dict where dict_type_id=1163718472451883009")
    List<Map> findType();
    @Select("SELECT bl.id,bl.name,bl.code from b_locator bl where bl.warehouseid!=41")
    List<Map> selectIMoLo();
    @Select("select * from b_stock b where b.locatorcode=#{code}")
    List<Stock> selectStockByLocCode(String code);
}
